package work;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class Start extends JFrame {
  ;
    public Start(){
        this.setBounds(600,200,400,200);
        this.setTitle("打砖块游戏");
        this.setResizable(false);
        this.setVisible(true);
        this.setLayout(null);
        JButton bt = new JButton("开始游戏");
        JLabel jl = new JLabel("这是个打砖块的游戏，用左右键控制，把砖块打完就行了。");
        JLabel jll = new JLabel("（如果你能打完砖块的话ヾ(=･ω･=)o）");
        bt.setBounds(140,120,100,30);
        jl.setBounds(40,30,400,30);
        jll.setBounds(80,50,400,30);
        this.add(bt);
        this.add(jl);
        this.add(jll);
        bt.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                new HitBrick();
                setVisible(false);
            }
        });
    }

    public static void main(String[] args) {
        new Start();
    }
}
